﻿@model User
@{
    string hidePhone = Model.Phone.HideFormat(3, 4);
    string hideUserCard = Model.UserCard.HideFormat(2, 2);
    //if (!string.IsNullOrEmpty(Model.UserCard))
    //{
    //    hideUserCard = Model.UserCard.Substring(0, 2) + "**** **** **** **" + Model.UserCard.Substring(Model.UserCard.Length - 2, 2);
    //}
    string hideEmail = Model.Email.HideFormat(3, '@');
}
<div class="user-right">
    <div class="user-stock user-security">
        <div class="s-title">安全信息</div>
        <div class="s-content">
            <ul>
                <li>
                    <span class="s-card"></span>
                    <span class="s-name">实名认证</span>
                    @if (string.IsNullOrEmpty(hideUserCard))
                    {
                        <span class="s-info"><em class="red">未认证</em>保障账户安全，只有完成实名认证才能提款</span>
                    }
                    else
                    {
                        <span class="s-info">
                            <em class="black">@hideUserCard</em>请上传照片完成认证
                        </span>
                    }
                    <span class="s-handle">
                        @if (string.IsNullOrEmpty(Model.UserTrueName) || string.IsNullOrEmpty(Model.UserCard))
                        {
                            <a href="javascript:void(0)" onclick="stockwindow.CardAuthentication(@Model.UserId)" class=" blue">认证</a>
                        }
                        else
                        {
                            if (string.IsNullOrEmpty(Model.UserCardPhoto1) || string.IsNullOrEmpty(Model.UserCardPhoto2) || string.IsNullOrEmpty(Model.UserCardPhoto3))
                            {
                                <a href="javascript:void(0)" onclick="stockwindow.UserPhotos(@Model.UserId)" class=" blue">上传照片</a>
                            }
                        }
                    </span>
                </li>
                <li>
                    <span class="s-phone"></span>
                    <span class="s-name">绑定手机</span>
                    <span class="s-info">
                        <em class="black">@hidePhone</em>
                        手机号码是您在赢在投资的重要身份凭证
                    </span>
                    <span class="s-handle">
                        <a href="javascript:void(0)" onclick="stockwindow.BindPhone('@Model.Phone','@hidePhone' ,@Model.UserId)" class="blue">修改</a>
                    </span>
                </li>
                <li>
                    <span class="s-mail"></span>
                    <span class="s-name">绑定邮箱</span>
                    @if (string.IsNullOrEmpty(hideEmail))
                    {
                        <span class="s-info">
                            <em class="red">未认证</em>
                            绑定邮箱后，可作登录时使用
                        </span>
                        <span class="s-handle">
                            <a href="javascript:void(0)" onclick="stockwindow.BindMail(@Model.UserId)" class="blue">绑定</a>
                        </span>
                    }
                    else
                    {
                        <span class="s-info">
                            <em class="red">@hideEmail</em>
                            可用邮箱登录@(WebConfig.WebSiteName)投资网站
                        </span>
                        <span class="s-handle">
                            <a href="javascript:void(0)" onclick="stockwindow.BindMail(@Model.UserId,'@hideEmail','@Model.Email')" class="blue">修改</a>
                        </span>
                    }

                </li>
                <li>
                    <span class="s-pwd"></span>
                    <span class="s-name">登录密码</span>
                    <span class="s-info">
                        <em class="black">已设置</em>
                        登录赢在投资网站时需要输入的密码
                    </span>
                    <span class="s-handle">
                        <a href="javascript:void(0)" onclick="stockwindow.LoginPassword(@Model.UserId)"  class="blue">修改</a>
                    </span>
                </li>
                <li>
                    <span class="s-key"></span>
                    <span class="s-name">提款密码</span>
                    @if (string.IsNullOrEmpty(Model.DrawingPassword))
                    {
                        <span class="s-info">
                            <em class="red">未设置</em>
                            保障资金安全，提款需要设置提款密码
                        </span>
                        <span class="s-handle">
                            <a href="javascript:void(0)" onclick="stockwindow.DrawingPassword(@Model.UserId)" class="blue">设置</a>
                        </span>
                    }
                    else
                    {
                        <span class="s-info">
                            <em class="red">已设置</em>
                            保障资金安全，提款需要设置提款密码
                        </span>
                        <span class="s-handle">
                            <a href="javascript:void(0)" onclick="stockwindow.FindDrawingPassword(@Model.UserId,'@hidePhone','@Model.Phone')" class="blue">忘记密码</a>
                            <a href="javascript:void(0)" onclick="stockwindow.ModifyDrawingPassword(@Model.UserId)" class="blue">修改</a>
                        </span>
                    }
                </li>
            </ul>
        </div>
    </div>
</div>